home *** CD-ROM | disk | FTP | other *** search
- SHIFTA(3I) Last changed: 1-6-98
-
-
- NNAAMMEE
- SSHHIIFFTTAA - Performs an arithmetic shift
-
- SSYYNNOOPPSSIISS
- SSHHIIFFTTAA (([II==]_i,, [JJ==]_j))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
-
- DDEESSCCRRIIPPTTIIOONN
- The SSHHIIFFTTAA intrinsic function performs a right shift with sign
- extension fill of the object _i by _j. Its arguments are as follows:
-
- _i The value to be shifted. Must be of type Boolean, integer, real,
- or Cray pointer.
-
- _j The number of bits to shift the value. Must be of type integer
- or Boolean. _j must be within the range 0 <= _j <= _s_i_z_e, where
- _s_i_z_e is the size, in bits, of _i. That is, if _i is a 64-bit
- object, _j must be within the range 0 <= _j <= 64.
-
- For values of _j outside these ranges, SSHHIIFFTTAA returns an undefined
- result.
-
- On UNICOS systems, an object is 64 bits. On UNICOS/mk systems, an
- object is 32 bits or 64 bits. On IRIX systems, an object is 8 bits,
- 16 bits, 32 bits, or 64 bits.
-
- SSHHIIFFTTAA is an elemental function. The name of this intrinsic cannot be
- passed as an argument.
-
- NNOOTTEESS
- The bit representation of the logical data type is not consistent
- among Cray Research systems. For further details, see the _F_o_r_t_r_a_n
- _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _3, publication SR-3905.
-
- RREETTUURRNN VVAALLUUEESS
- SSHHIIFFTTAA returns a value of type Boolean on UNICOS and UNICOS/mk
- systems. It returns an integer result on IRIX systems.
-
- EEXXAAMMPPLLEESS
- The following section of Fortran code shows the SSHHIIFFTTAA function used
- in the case where _i is of type integer. The bit pattern of _i and the
- bit pattern of the result are shown. For clarity, a 16-bit value is
- used rather than a 64-bit value.
-
- INTEGER I1, I2, I3
- ...
- I2 = 5
- I3 = SHIFTA(I1,I2)
-
- ------------------------------------------------------------------------------------------------------------------------------
- | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 |
- ------------------------------------------------------------------------------------------------------------------------------
- II11 ((_i))
-
- ------------------------------------------------------------------------------------------------------------------------------
- | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 00 | 00 | 00 |
- ------------------------------------------------------------------------------------------------------------------------------
- II33 ((rreessuulltt))
-
- SSEEEE AALLSSOO
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
- printed version of this man page.
-
-